import axios from  "../model/axios";

//树摇 
export   const  leaveAdd  = (data:any)=>{
    return  axios({
        method:"post",
        url:"/api/leaves/add",
        data
    })
}


//学生查看自己的请假记录
export   const  leaveList  = (params:any)=>{
    return  axios({
        method:"get",
        url:"/api/leaves/list",
        params
    })
}
//老师查看所有的请假记录
export   const  leaveListAll  = (params:any)=>{
    return  axios({
        method:"get",
        url:"/api/leaves/listall",
        params
    })
}
//更新
export   const  leaveUpdate  = (data:any)=>{
    return  axios({
        method:"patch",
        url:"/api/leaves/update",
        data
    })
}

//分组
export  const  leaveGroup  = (params:any)=>{
    return  axios({
        method:"get",
        url:"/api/leaves/group",
        params
    })
}